package com.xbongbong.admin.domain.dao;

import com.xbongbong.admin.domain.entity.MirrorWorkOrderTemplateEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @auther: xingxing.xiao
 * @date: 3/3/2020 21:39
 */
@Repository
@Mapper
public interface MirrorWorkOrderTemplateDao {

    Integer insert(MirrorWorkOrderTemplateEntity entity);

    Integer update(MirrorWorkOrderTemplateEntity entity);

    List<MirrorWorkOrderTemplateEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    MirrorWorkOrderTemplateEntity getByKey(@Param("key") Long key);

    Integer moveToDefault(@Param("categoryId") Long categoryId, @Param("defaultId") Long defaultId);

    Integer deleteByKey(@Param("key") Long key);

    /**
     * 批量插入
     * @param list
     */
    Integer insertBatch(@Param("list") List<MirrorWorkOrderTemplateEntity> list);
}
